<?php


/**
 * This class defines the structure of the 'user_team_player' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    orm.map
 */
class UserTeamPlayerTableMap extends TableMap {

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'orm.map.UserTeamPlayerTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
	  // attributes
		$this->setName('user_team_player');
		$this->setPhpName('UserTeamPlayer');
		$this->setClassname('UserTeamPlayer');
		$this->setPackage('orm');
		$this->setUseIdGenerator(true);
		// columns
		$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, 11, null);
		$this->addForeignKey('USER_TEAM_ID', 'UserTeamId', 'INTEGER', 'user_team', 'ID', false, 11, null);
		$this->addForeignKey('PLAYER_ID', 'PlayerId', 'INTEGER', 'player', 'ID', false, 11, null);
		$this->addColumn('IS_CAPTAIN', 'IsCaptain', 'CHAR', false, 1, 'N');
		$this->addColumn('PURCHASED_PRICE', 'PurchasedPrice', 'INTEGER', false, 11, null);
		$this->addColumn('POINTS', 'Points', 'INTEGER', false, 11, null);
		$this->addColumn('ADDED_DATE', 'AddedDate', 'DATE', false, null, null);
		$this->addColumn('MOM', 'Mom', 'INTEGER', false, 11, null);
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
    $this->addRelation('UserTeam', 'UserTeam', RelationMap::MANY_TO_ONE, array('user_team_id' => 'id', ), null, null);
    $this->addRelation('Player', 'Player', RelationMap::MANY_TO_ONE, array('player_id' => 'id', ), null, null);
	} // buildRelations()

} // UserTeamPlayerTableMap
